package Model;

/**
 * Created with IntelliJ IDEA.
 * User: Женя
 * Date: 03.11.13
 * Time: 19:38
 * To change this template use File | Settings | File Templates.
 */

public class Props {
    private int id;
    private String nameOfProps;
    private Integer quantityOfProps;

    public Props() {
    }

    public Props(int id, String nameOfProps, Integer quantityOfProps) {
        this.id = id;
        this.nameOfProps = nameOfProps;
        this.quantityOfProps = quantityOfProps;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getNameOfProps() {
        return nameOfProps;
    }

    public void setNameOfProps(String nameOfProps) {
        this.nameOfProps = nameOfProps;
    }

    public Integer getQuantityOfProps() {
        return quantityOfProps;
    }

    public void setQuantityOfProps(Integer quantityOfProps) {
        this.quantityOfProps = quantityOfProps;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        Props props = (Props) o;

        if (id != props.id) return false;
        if (nameOfProps != null ? !nameOfProps.equals(props.nameOfProps) : props.nameOfProps != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = id;
        result = 31 * result + (nameOfProps != null ? nameOfProps.hashCode() : 0);
        return result;
    }

    @Override
    public String toString() {
        return "Props{" +
                "id=" + id +
                ", nameOfProps='" + nameOfProps + '\'' +
                ", quantityOfProps=" + quantityOfProps +
                '}';
    }
}
